# -*- coding: utf-8 -*-
##############################################################################
#
#
##############################################################################

from odoo.report import report_sxw
from odoo import models


class stock_slacking_report(report_sxw.rml_parse):

    def __init__(self, cr, uid, name, context):
        super(stock_slacking_report, self).__init__(cr, uid, name, context=context)
        self.localcontext.update({
            'get_lines': self.get_lines,
        })
        self.context = context

    def get_lines(self, form):
        result = []
        for o in self.objects:
            result += o.get_lines(form)
        return result

class report_stockslacking(models.AbstractModel):
    _name = 'report.inventory_slack_report.report_stockslacking'
    _inherit = 'report.abstract_report'
    _template = 'inventory_slack_report.report_stockslacking'
    _wrapped_report_class = stock_slacking_report

# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
